public class Test {
    public static void main1(String[] args) {
        String str1 = "hello";
        String str2 = new String("hello bit");
        char[] array = {'h', 'e', 'l','l','o'};
        String str3 = new String(array);
        System.out.println(str1);
        System.out.println(str2);
        System.out.println(str3);
    }

    public static void main(String[] args) {
        String str1 = "hello";
        String str2 = "world";
        String str3 = str1;
        System.out.println(str1 == str3);
        System.out.println(str1 == str2);
        System.out.println(str1.equals(str2));
        System.out.println(str1.equals(str3));
    }









}
